<template>
  <div id="home">
    <header>
      <lottIe class="lottieSize" :options="heartOptions" />
    </header>
    <div class="firstBox">
      <div class="textBox">
        <vue-typed-js
          class="desc"
          :strings="typingTexts"
          :loop="true"
          :startDelay="300"
          :typeSpeed="100"
          :backSpeed="50"
          ><span class="typing"></span>
        </vue-typed-js>
      </div>
      <vue-particles
        class="bg"
        color="#39AFFD"
        :particleOpacity="0.7"
        :particlesNumber="100"
        shapeType="circle"
        :particleSize="4"
        linesColor="#8DD1FE"
        :linesWidth="1"
        :lineLinked="true"
        :lineOpacity="0.4"
        :linesDistance="150"
        :moveSpeed="3"
        :hoverEffect="true"
        hoverMode="grab"
        :clickEffect="false"
        clickMode="push"
      >
      </vue-particles>
    </div>
    <div class="secondBox">
      <lottIe class="lottieSize" :options="meteorOptions" />
    </div>
    <div class="thirdBox"></div>
  </div>
</template>

<script>
export default {
  name: 'HOME',
  components: {
  },
  data () {
    return {
      typingTexts: [
        "hello",
        "world",
      ],
      heartOptions: {
        animationData: require('../assets/lottieJson/xingXing.json'),
        loop: true,
        autoplay: true,
      },
      meteorOptions: {
        animationData: require('../assets/lottieJson/119227-falling-meteor.json'),
        loop: true,
        autoplay: true,
      },
    }
  },
  mounted () {
  },
  methods: {
  }
}
</script>

<style lang="less" scope>
#home {
  font-size: 16px;
  width: 100%;
  header {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    z-index: 1;
    .lottieSize {
      width: 50px;
      height: 50px;
    }
  }
  .firstBox {
    width: 100%;
    height: 100vh;
    background: url("@/assets/imgs/wallhaven-3llgk6_3840x2160.png") no-repeat;
    background-size: 100% 100%;
    position: relative;
    .textBox {
      position: absolute;
      top: 20%;
      left: 10%;
      color: #fff;
      font-size: 50px;
      font-weight: bold;
      .desc {
        background-image: -webkit-linear-gradient(
          left,
          blue,
          #66ffff 10%,
          #cc00ff 20%,
          #cc00cc 30%,
          #ccccff 40%,
          #00ffff 50%,
          #ccccff 60%,
          #cc00cc 70%,
          #cc00ff 80%,
          #66ffff 90%,
          blue 100%
        );
        -webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
        -webkit-background-size: 200% 100%;
        -webkit-animation: masked-animation 1s linear infinite;
      }
    }
  }
  .secondBox {
    width: 100%;
    height: 100vh;
    background: url("@/assets/imgs/wallhaven-9do9vx_3840x2160.png") no-repeat;
    background-size: 100% 100%;
    position: relative;
    .lottieSize {
      width: 300px;
      height: 300px;
      transform: rotateY(180deg);
      position: absolute;
      top: 0;
      left: 33%;
    }
  }
  .thirdBox {
    width: 100%;
    height: 100vh;
    background: url("@/assets/imgs/wallhaven-7pje7o_3840x2160.png") no-repeat;
    background-size: 100% 100%;
  }
  .bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }
} /*滚动条样式*/
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.1);
}
</style>
